<template>
  <div>
    <!-- 面包屑 -->
    <el-breadcrumb separator="/">
      <el-breadcrumb-item :to="{ path: '/' }">首页</el-breadcrumb-item>
      <el-breadcrumb-item>数据统计</el-breadcrumb-item>
      <el-breadcrumb-item>数据报表</el-breadcrumb-item>
    </el-breadcrumb>
    <!-- exharts表格 -->
    <el-card style="margin-top: 20px">
      <div id="main" style="width: 750px; height: 400px"></div>
    </el-card>
  </div>
</template>

<script>
import * as echarts from 'echarts'
import { getEcharts } from '@/api/reports'
export default {
  name: 'reportsIndex',
  data () {
    return {}
  },
  async mounted () {
    const myChart = echarts.init(document.getElementById('main'))

    // 获取数据
    const res = await getEcharts()
    // console.log(res.data)
    myChart.setOption(res.data)
  },

  created () {},

  methods: {}
}
</script>

<style scoped lang='scss'>
</style>
